package com.moweilin.mo_gateway.handlers;


import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.ext.web.Router;

/**
 * Created by moweilin on 2017/2/21.
 */
public class DefaultLocalRequestHandler implements Handler<HttpServerRequest> {
    private Router router;
    public DefaultLocalRequestHandler(Vertx vertx) {
        router = Router.router(vertx);
    }

    @Override
    public void handle(HttpServerRequest event) {
        router.accept(event);
//        event.response().setStatusCode(HttpURLConnection.HTTP_BAD_REQUEST).end("Bad Request");
    }

}
